#ifndef MAINSDL_H
#define MAINSDL_H

#include <QThread>
#include <QElapsedTimer>
#include <QCoreApplication>


extern "C"
{
#include "ijksdl.h"
#include "ijkplayer.h"
#include "ijkplayer_internal.h"

#include "pipeline/ffpipeline_ffplay.h"
#include "pipeline/ffpipenode_ffplay_vdec.h"
#include "linux/ijksdl_vout_SDL_surface.h"

#include "util/dump_pts.h"
}


class ijkplayerImp : public QThread
{
    Q_OBJECT
public:
    explicit ijkplayerImp();
    ~ijkplayerImp();


    int setdatasource(char *);
    int get_state();
    int startplay();
    int pause();
    int seekto(long);
    long get_duration();
    long get_playable_duration();
    long get_current_position();
    int stopplay();

signals:
    void sig_prepared(qint64);


protected:

    void run();

    void init();
    IjkMediaPlayer *mp;


};

#endif // MAINSDL_H
